package com.twotwoshop.fegin.api.user;


import com.twotwoshop.domin.common.dtos.ResponseResult;
import com.twotwoshop.fegin.api.config.FeignInterceptor;
import com.twotwoshop.fegin.api.user.fallback.IUserClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户远程调用
 */                                                            //实现服务降级
@FeignClient(value = "twotwo-service-user",path ="/user" , fallback = IUserClientFallback.class,configuration = FeignInterceptor.class)
public interface IUserClient {


    /**
     * 查看用户信息
     * @return
     */
    /**
     * 获取用户信息
     */
    @GetMapping("/info/{id}")  // 修改为正确的用户服务API路径
    ResponseResult getUserInfoById(@PathVariable("id") Long id);


}



